package com.jhs.boot.common.enums;

import lombok.Getter;


@Getter
public enum NodesEnum   {
    TOP(0, 50,"MPP"),
    MID(1, 40,"MAP"),
    END(2, 30,"终端"),
    RFID(3, 30,"RFID"),
    ;

    private final Integer mode;
    private final Integer val;
    private final String typeName;
    NodesEnum(Integer mode, Integer val, String typeName) {
        this.mode = mode;
        this.val = val;
        this.typeName=typeName;
    }
    public static NodesEnum find(Integer mode) {
        for (NodesEnum value : NodesEnum.values()) {
            if (value.mode.equals(mode)) {
                return value;
            }
        }
        return TOP;
    }

}
